Trend Tool – Methods
The following table lists and describes methods of the Trend Tool. Methods are accessed using the control's script editor.
Note: If a property or method in the script editor has two forms with the same name, one form exists for legacy support and the other form is current. When possible, use the current form. To select the current form, append .X. to the name of the object to which the property or method applies, and then enter the property or method name. For instance, enter MyObject.X.MyProperty. If a property or method in the script editor has only one form, the X method might or might not apply. The
column in the table below indicates whether or not a property or method is accessible using the X method.
| Method |
|
Description |
|---|---|---|
| Yes |
The AboutBox method displays an About dialog box for the control. SyntaxAboutBox() ExampleThe following examples launch an About dialog box for the control. Copy
AboutBox
|
|
| Yes |
The AddSeriesDialog method calls the Series dialog box where you can add a new series to your trend. |
|
| No |
The AlarmAcknowledge method acknowledges an alarm. |
|
| Yes |
The Cancel method closes an object and TheView. |
|
| CaptureMouse | No |
The CaptureMouse method forces mouse events to fire. While the mouse is being captured, mouse events will continue to fire on the capturing entity regardless of current mouse position. This function better facilitates dragging objects on views, such as splitters to allow for more flexible layout capabilities. Automatically released on left mouse button release. Context menus are not displayed while capturing. If the function is called on a windowed tool, the function sets capture to that window. If called on a non-windowed tool, it sets capture to TheView and tracks which tool is "captured," altering its mouse event functions to always fire for that tool until released. |
| No |
The ClearMenu method clears all custom items from the context menu. Syntax
Parameters
Return Values
|
|
| ClearNoteSelection | Yes |
ClearNoteSelection clears every note label selection in a Trend Tool. Syntax
Parameters
Return Values
See also Notes. |
| Yes |
The DeleteAllSeries method removes all series from a trend. |
|
| Yes |
The DeleteSeries method clears trend selection(s) from a check list that was created by using the Microsoft ListView control. |
|
| DisplayedToConfiguredAxis | Yes |
Returns the configured (XML) axis index number for a given displayed axis index number. |
| Yes |
The EditAxesDialog method calls the Axis Configuration dialog where you can edit an axis in the trend. |
|
| Yes |
The EditSeriesDialog method calls the Series dialog box where you can edit a series in the trend. |
|
| Yes |
The Export method exports the contents of the grid to a temporary CSV file and opens the file with the default spreadsheet viewer for the user to view and save to disk. See Exporting Trends. |
|
| Yes |
The ExportAsImage method allows export of an image of a trend. See Exporting Trends. |
|
| No | ||
| GetAlarmLimitInfoXml | Yes |
The GetAlarmLimitInfoXml method returns an XML string of the trend’s alarm limit configuration. Syntax
|
| GetAxisById | Yes | The GetAxisById method returns the configured (XML) axis index number for a given axis ID number. |
| GetDisplayedNotes | Yes |
GetDisplayedNotes returns an array of DisplayNote objects that are currently displayed in the view window of the Trend Tool. Syntax
Parameters
Return Values
See also Notes. |
| No |
The GetDlgCtrlID method returns the numeric resource identifier of the control within TheView. |
|
| GetGroup | No |
The GetGroup method returns the object group to which an object belongs, and returns null if the object does not belong to a group. The GroupID property returns the GroupID. Calling GetGroup is equivalent to calling TheView GetGroupByID and passing the value of the object’s GroupID property, and is provided for convenience. |
| GetSelectedAlarmLimitSeries | Yes |
The GetSelectedAlarmLimitSeries method returns an index of series currently selected to have its alarm limits displayed. Syntax
|
| GetSelectedNote | Yes |
The GetSelectedNote method returns the SITE.SERVICE~NOTENUMBER of the currently selected note label. A note's database key with no preceding zeroes makes up NOTENUMBER. Syntax
Parameters
Return Values
See also Notes. |
| Yes |
The GetTemplateXml method returns properties in XML format without Point Tag specifiers. |
|
| Yes |
The GetValuesAtTime method returns the value of a series at a time slice. |
|
| No |
The HistoryAlarms method calls the Alarm History dialog box, which shows the alarm history of an individual alarm, and provides options for showing only particular types of alarm events. See Alarm History for more information. |
|
| No |
The HistoryValues method calls the History Values dialog box, which shows all the history records for a given point, including additional information if the history name came from the PNT. See History Records for more information. |
|
| No |
The IsSelected method indicates if the tool or control is selected. Can be used with [ContextMenuAutoSelect]. |
|
| No |
The LayerName method gets the name of the layer on which the object resides. |
|
| Yes |
The Maximize method maximizes the trend. When entering maximization mode, the Maximize parameter value passed in is "True." When exiting maximization mode, the Maximize parameter value passed in is "False." |
|
| No |
The Move method moves an object by the specified amount, relative to its current position. |
|
| No |
The OnUpdate method updates the control to ensure that any property modifications have taken effect. |
|
| No |
The OnUpdateResize method updates the control to ensure that any modifications to its boundary have taken effect. |
|
| No |
The OnUpdateStyle method updates the control to ensure that any modifications to its style properties have taken effect. |
|
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| Yes |
The Print method prints the contents of the control, grid, or viewer. When this method is called, the Print dialog box is shown to allow configuration. |
|
| Yes |
The PrintToDefaultPrinter method prints a trend grid to the default printer. |
|
| Yes |
The ReadFromFile method reads the trend from a file. |
|
| Yes |
The Refresh method refreshes the contents of the control from the Current Value Service (CVS). |
|
|
No |
The RegisterPointForChangeNotice method registers an unrelated point on a screen that may change its value. Used in conjunction with EventPointChange. |
|
| No | ||
| Yes |
For objects, the Restart method stops and restarts Run mode. For TheFrame/TheView, the Restart method restarts TheView with new site, service, and facility information, if applicable. See also RestartSoft. |
|
| No |
For the Group Grid Tool and Trend Tool, the RestartSoft method stops and restarts Run mode. For TheFrame/TheView, the RestartSoft method restarts TheView with new site, service, and facility information, if applicable. See also Restart. |
|
| No |
The RunInitialize method runs the object’s EventInitialize event code. |
|
| No | This method is not used. | |
| Yes |
The ScrollBackward method scrolls the data window backward through trend time. |
|
| Yes |
The ScrollForward method scrolls the data window forward through trend time. |
|
| No |
The Select method selects the tool or control. "True" to select, "false" to clear. Can be used with [ContextMenuAutoSelect]. |
|
| SelectNote | Yes |
SelectNote selects a note item in the Trend Tool. Both this method and the Note Feed Tool method SetSelection must be called in order for a Trend Tool and a Note Feed Tool to synchronize. This method fires this tool's EventNoteSelected event. Syntax
Parameters
Return Values
See also Notes. |
| SetAlarmLimitInfoXml | Yes |
The SetAlarmLimitInfoXml method sets the trend’s alarm limit configuration XML string. Syntax
Parameters
|
| No |
The SetFocus method sets the focus to the control. |
|
| SetMaximizedCheck | Yes |
The SetMaximizedCheck method sets the check next to the Maximized context menu item. |
| No |
The SetMenuItem method is called to control an item in the context menu for the tool. |
|
| SetSelectedAlarmLimitSeries | Yes |
The SetSelectedAlarmLimitSeries method changes or sets the series for which to display alarm limits. Syntax
Parameters
|
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| UseCygNetMaximize | Yes | |
| Yes |
The WriteToFile method writes the trend to a file. |
|
| X | No |
The X method returns an object that lists properties and methods specific to an ActiveX control. This method is only available for some ActiveX controls. |


